class CreateTableItemCrawlComments < ActiveRecord::Migration
  def self.up
    create_table :item_crawl_comments do |t|
      t.integer :item_id,   :null => false
      t.string  :user_name, :limit => 100,  :null => false
      t.text    :content,    :null => false
      t.datetime  :comment_time,  :null => false
      t.string    :shop_title,  :limit => 100
      t.string    :shop_url,  :limit => 500
      t.string    :source_site, :limit => 100
      t.integer   :up_vote_count, :default => 0
      t.integer   :down_vote_count, :default => 0
      t.integer   :status,  :limit => 1, :default => 0
      t.integer   :flag,  :limit => 4, :default => 0
      t.text      :remarks
    end
  end

  def self.down
    drop_table  :item_crawl_comments
  end
end
